﻿@{
    ViewBag.Title = "Products";
}
@section Navbar{
 @{Html.RenderPartial("_Navbar");}
}
<div id="Contain">
    
    	<div id="Conleft">
        
        	<h4 class="boxhead">分销商信息<a href="#">[修改信息]</a></h4>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="info">
              <tr>
                <td colspan="3" height="5"></td>
              </tr>
              <tr>
                <td width="27" height="28">&nbsp;</td>
                <td width="196"><p><a href="#" class="red">zwenpu</a> 欢迎您！</p></td>
                <td width="20">&nbsp;</td>
              </tr>
              <tr>
                <td height="28">&nbsp;</td>
                <td><p>分销商类别：<span class="red">未认证</span><strong><a href="#" class="blue">［马上认证］</a></strong></p></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td height="28">&nbsp;</td>
                <td><p>分销商ID:<span class="red">30298388</span></p></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td colspan="3" height="7"></td>
              </tr>
            </table>

            
            
    		<h4 class="boxhead">我的订单(总计：￥1，300)</h4>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="myorder">
              <tr>
                <td width="13%" height="26">&nbsp;</td>
                <td width="43%"><h4>名称</h4></td>
                <td width="23%" align="center"><h4>数量</h4></td>
                <td width="21%" align="center"><h4>小计</h4></td>
              </tr>
              <tr bgcolor="#d5d5d5">
                <td height="26" align="center" valign="middle"><a href="#"><img src="images/ico_1.gif" width="20" height="20" border="0" /></a></td>
                <td><p><a href="#" class="g_r">华硕U盘...</a></p></td>
                <td align="center"><p>10</p></td>
                <td align="center"><p>￥650</p></td>
              </tr>
              <tr bgcolor="#dfdfdf">
                <td height="26" align="center" valign="middle"><a href="#"><img src="images/ico_1.gif" width="20" height="20" border="0" /></a></td>
                <td><p><a href="#" class="g_r">华硕U盘...</a></p></td>
                <td align="center"><p>10</p></td>
                <td align="center"><p>￥650</p></td>
              </tr>
              <tr bgcolor="#d5d5d5">
                <td height="26" align="center" valign="middle"><a href="#"><img src="images/ico_1.gif" width="20" height="20" border="0" /></a></td>
                <td><p><a href="#" class="g_r">华硕U盘...</a></p></td>
                <td align="center"><p>10</p></td>
                <td align="center"><p>￥650</p></td>
              </tr>
              <tr>
                <td colspan="4"><a href="#" class="btn_buy"></a></td>
              </tr>
            </table>

            
            <h4 class="boxhead">产品类别</h4>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="catagory">
              <tr>
                <td colspan="2" height="1" bgcolor="#ffffff"></td>
              </tr>
               
              @foreach (var item in ViewBag.Categorys as IQueryable<Home.Domain.Entities.Category>)
              {
                  <tr>
                <td width="33%" align="center" valign="middle" bgcolor="#e5e5e5"><h4><a href="@Url.Action("Products", new { ParentId=item.Id })">@item.Name</a></h4></td>
                <td width="67%" class="brand_list">
               	  <p>
                  @{int ceCount = item.ChildEntitis.Count;}@*子分类数量*@
                  @if (ceCount!=0)
                  {
                      int style=0;
                      foreach (var child in item.ChildEntitis.OrderByDescending(ce => ce.Sort))
                      {
                          style++;
                          <a href="@Url.Action("Products", new { ParentId=item.Id, ChildId = child.Id })">@child.Name</a>@(style==ceCount?null:Html.Raw("<span>|</span>"))
                      }

                  }
                  else {
                      int bdCount = item.Category_Brands.Count;
                      int style = 0;
                      foreach (var Brands in item.Category_Brands)
                      {
                          style++;
                          <a href="@Url.Action("Products", new { BrandId = Brands.BrandId,ParentId=item.Id })">@Brands.Brand.Name</a>@(style == bdCount ? null : Html.Raw("<span>|</span>"))                         
                      }
                  }
                  </p></td>
              </tr>
                    <tr>
                <td colspan="2" height="1" bgcolor="#ffffff"></td>
              </tr>
              }
            </table>

            
            
            
            
<h4 class="boxhead">推荐品牌</h4>
        	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="brand">
              <tr>
                <td height="5"></td>
              </tr>
              <tr>
                <td align="center"><a href="#"><img src="/Content/images/brand_1.gif" width="146" height="46" border="0" /></a></td>
              </tr>
              <tr>
                <td align="center"><a href="#"><img src="/Content/images/brand_2.gif" width="96" height="61" border="0" /></a></td>
              </tr>
              <tr>
                <td align="center"><a href="#"><img src="/Content/images/brand_3.gif" width="155" height="35" border="0" /></a></td>
              </tr>
              <tr>
                <td align="center"><a href="#"><img src="/Content/images/brand_4.gif" width="96" height="65" border="0" /></a></td>
              </tr>
              <tr>
                <td align="center"><a href="#"><img src="/Content/images/brand_5.gif" width="154" height="42" border="0" /></a></td>
              </tr>
            </table>
            <br />
			<br />


      </div>
        
      <div id="Conright">
    <h4 class="local">您的位置：<a href="@Url.Action("Products", "Home")">产品首页</a>
    @(ViewBag.Parent == null ? null : Html.Raw("<span>&gt;&gt;</span><a href=\"" + Url.Action("Products", new { ParentId = ViewBag.ParentId }) + "\">" + ViewBag.Parent + "</a>"))
    @(ViewBag.Child == null ? null : Html.Raw("<span>&gt;&gt;</span><a href=\"" + Url.Action("Products", new { ChildId = ViewBag.ChildId }) + "\">" + ViewBag.Child + "</a>"))
    @(ViewBag.Brand == null ? null : Html.Raw("<span>&gt;&gt;</span><a href=\"" + Url.Action("Products", new { ParentId = ViewBag.ParentId, BrandId = ViewBag.BrandId }) + "\">" + ViewBag.Brand + "</a>")) 
    </h4>
          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="sealist">
            <tr>
              <th colspan="6" height="4" bgcolor="#d62323"></th>
            </tr>
            <tr>
              <th colspan="6" height="1" bgcolor="#ffffff"></th>
            </tr>
            <tr>
              <th width="14%" height="28" align="center" bgcolor="#eaeaea"><h4>产品图片</h4></th>
              <th width="20%" align="left" bgcolor="#eaeaea"><h4>产品名称</h4></th>
              <th width="28%" align="left" bgcolor="#eaeaea"><h4>产品描述</h4></th>
              <th width="11%" align="center" bgcolor="#eaeaea"><h4>分销价格</h4></th>
              <th width="13%" align="center" bgcolor="#eaeaea"><h4>&nbsp;</h4></th>
              <th width="14%" align="center" bgcolor="#eaeaea"><h4>操作</h4></th>
            </tr>
            @foreach (var item in ViewBag.Products as IEnumerable<Home.Domain.Entities.Product>)
            {
                <tr bgcolor="#f6f6f6">
              <td height="26" align="center"><a href="#"><img src="@item.Pic" width="48" height="48" border="0" class="picview" /></a></td>
              <td><p>@item.Name</p></td>
              <td><p>@item.Description</p></td>
              <td align="center"><p>@string.Format("{0:C}",item.Price)</p></td>
              <td align="center">
              	
                <div class="nums ct">
                	<a href="#" class="fl">-</a>
                    <input type="text" value="10" class="fl" />
                    <a href="#" class="fl">+</a>
                    <div class="cls"></div>
                </div>

              </td>
              <td align="center"><p align="center"><a href="#" class="btn_order ct"></a></p></td>
            </tr>
            }
            <tr>
              <th colspan="6" height="10" bgcolor="#ffffff"></th>
            </tr>
            <tr>
              <th colspan="6" height="4" bgcolor="#d62323"></th>
            </tr>
          </table>
          
          <div class="pages mt10">
          <ul class="fr">@Html.PageLinks(ViewBag.PagingInfo as Home.WebUI.Models.PagingInfo, x => Url.Action("Products", new { Page = x }))</ul>
          	@*<ul class="fr">
            	<li><a href="#" class="nopage">&lt;</a></li>
                <li><a href="#">&lt;</a></li>
                <li><a href="#">&gt;</a></li>
                <li><a href="#" class="sel">1</a></li>
                <li><a href="#">2</a></li>
                <li><a href="#">3</a></li>
                <li><a href="#">上一页</a></li>
                <li><a href="#">下一页</a></li>
            </ul>*@
            <div class="cls"></div>
          </div>
          <div class="cls"></div>

            
            
            
            
            
  </div>
        <div class="cls"></div>
        
        <!--其他信息-->
        <div id="Other">
            <ul>
            	<li class="oheader">关于中关村进货宝</li>
                <li><a href="#">公司简介</a></li>
                <li><a href="#">加入中关村进货宝</a></li>
                <li><a href="#">合作专区</a></li>
                <li><a href="#">联系我们</a></li>
            </ul>
            <ul>
            	<li class="oheader">支付方式</li>
                <li><a href="#">在线支付（推荐）</a></li>
                <li><a href="#">银行电汇</a></li>
                <li><a href="#">到我公司付款</a></li>
                <li><a href="#">上门收费</a></li>
                <li><a href="#">支票付费</a></li>
            </ul>
            <ul>
            	<li class="oheader">配送范围及时间</li>
                <li><a href="#">国内配送</a></li>
                <li><a href="#">海外配送</a></li>
                <li><a href="#">订单拆分</a></li>
            </ul>
            <ul>
            	<li class="oheader">售后服务</li>
                <li><a href="#">退换货政策</a></li>
                <li><a href="#">退换货办理流程</a></li>
                <li><a href="#">退换货网上办理</a></li>
                <li><a href="#">退款说明</a></li>
            </ul>
            <ul>
            	<li class="oheader">帮助中心</li>
                <li><a href="#">找回密码</a></li>
                <li><a href="#">邮件订阅</a></li>
                <li><a href="#">产品册订阅</a></li>
                <li><a href="#">隐私声明</a></li>
            </ul>
        </div>
        <div class="cls"></div>
    </div>